<template>
	<view>
		<!-- 头部header -->
		<view class="header">
			<uni-nav-bar :statusBar="true" leftIcon="arrowleft" fixed="true" title="公示详情" @clickLeft="clickLeft"></uni-nav-bar>
		</view>
		<view class="header-article-title">
			<view class="title">{{articleList.title}}</view>
			<view class="description">
				<text>阅读次数：{{articleList.readTimes}}</text>
				<text>时间：{{articleList.createTime}}</text>
			</view>
		</view>
		<view class="content" v-html="articleList.content">
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				articleList: '<text>阿斯顿发送到</text>'
			}
		},
		onLoad(option) {
			const canteenPublicityId = option.id;
			console.log(canteenPublicityId)
			this.$request.ygstCanteenGet({
				canteenPublicityId
			}).then(res => {
				this.articleList = res
			}).catch(e => {
				console.log(e)
			})
		},
		
		methods: {
			/**
			 * @description: 返回上一页
			 * @author: LinW (xuebingchuan_20@163.com)
			 * @createDate: 2020-10-10 10:40
			 */
			clickLeft() {
				uni.navigateBack()
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		padding: 70rpx 40rpx;
		text-indent: 20px;
		font-size: 28rpx;
		color: #898989;
	}

	.header-article-title {
		text-align: center;
		padding-top:  50rpx;

		.title {
			font-size: 30rpx;
			color:#2B2B2B;
			margin-bottom: 6rpx;
			word-break: break-all;
		}

		.description {
			font-size:  25rpx;
			color: #AFAFAF;
		}
	}
</style>
